package hikvision

import "encoding/xml"

type UserCheck struct {
	XMLName           xml.Name `xml:"userCheck"`
	Version           string   `xml:"version,attr"`
	Xmlns             string   `xml:"xmlns,attr"`
	StatusValue       int      `xml:"statusValue"`
	StatusString      string   `xml:"statusString"`
	IsDefaultPassword bool     `xml:"isDefaultPassword"`
	IsRiskPassword    bool     `xml:"isRiskPassword"`
	IsActivated       bool     `xml:"isActivated"`
	LockStatus        string   `xml:"lockStatus"`
	UnlockTime        int      `xml:"unlockTime"`
	RetryLoginTime    int      `xml:"retryLoginTime"`
}

type DeviceCap struct {
	XMLName                                 xml.Name                    `xml:"DeviceCap"`
	Version                                 string                      `xml:"version,attr"`
	Xmlns                                   string                      `xml:"xmlns,attr"`
	IsSupportPreview                        bool                        `xml:"isSupportPreview"`
	IsSupportSystemMaintain                 bool                        `xml:"isSupportSystemMaintain"`
	IsSupportReboot                         bool                        `xml:"isSupportReboot"`
	IsSupportFactoryReset                   bool                        `xml:"isSupportFactoryReset"`
	IsSupportConfigurationData              bool                        `xml:"isSupportConfigurationData"`
	IsSupportUpdatefirmware                 bool                        `xml:"isSupportUpdatefirmware"`
	IsSupportDeviceInfo                     bool                        `xml:"isSupportDeviceInfo"`
	IsSupportTime                           bool                        `xml:"isSupportTime"`
	SysCap                                  SysCap                      `xml:"SysCap"`
	ITCCap                                  ITCCap                      `xml:"ITCCap"`
	IsSupportDumpData                       bool                        `xml:"isSupportDumpData"`
	AIDEventSupport                         AIDEventSupport             `xml:"AIDEventSupport"`
	IsVehicleStatisticsSupport              bool                        `xml:"isVehicleStatisticsSupport"`
	IsSupportVehicleFaceRecognition         bool                        `xml:"isSupportVehicleFaceRecognition"`
	IsSupportVehicleIllegalType             IsSupportVehicleIllegalType `xml:"isSupportVehicleIllegalType"`
	IsSupportRadarVideoDetection            bool                        `xml:"isSupportRadarVideoDetection"`
	IsSupportRadar                          bool                        `xml:"isSupportRadar"`
	DeviceReboot                            DeviceReboot                `xml:"deviceReboot"`
	FactoryReset                            FactoryReset                `xml:"factoryReset"`
	OpenPlatformCap                         OpenPlatformCap             `xml:"OpenPlatformCap"`
	IsSupportDrivingDirectionAtIntersection bool                        `xml:"isSupportDrivingDirectionAtIntersection"`
	IsSupportLCDScreen                      bool                        `xml:"isSupportLCDScreen"`
	SupportQuickConfigType                  SupportQuickConfigType      `xml:"supportQuickConfigType"`
	IsSupportRTMP                           bool                        `xml:"isSupportRTMP"`
	VideoIntercomCap                        VideoIntercomCap            `xml:"VideoIntercomCap"`
	IsSupportISUPHttpPassthrough            bool                        `xml:"isSupportISUPHttpPassthrough"`
	IsSupportDetectorMotionAlarm            bool                        `xml:"isSupportDetectorMotionAlarm"`
	IsSupportOnlineUpgradeTask              bool                        `xml:"isSupportOnlineUpgradeTask"`
	IsSupportPowerIndicatorLightCtrlParams  bool                        `xml:"isSupportPowerIndicatorLightCtrlParams"`
	IsSupportEmmcInfo                       bool                        `xml:"isSupportEmmcInfo"`
}

type SysCap struct {
	NetworkCap                NetworkCap `xml:"NetworkCap"`
	SerialCap                 SerialCap  `xml:"SerialCap"`
	IsSupportSubscribeEvent   bool       `xml:"isSupportSubscribeEvent"`
	IsSupportSubscribeIOTInfo bool       `xml:"isSupportSubscribeIOTInfo"`
}

type NetworkCap struct {
	IsSupportGetLinkSocketIP        bool                         `xml:"isSupportGetLinkSocketIP"`
	IsSupportWireless               bool                         `xml:"isSupportWireless"`
	IsSupportPPPoE                  bool                         `xml:"isSupportPPPoE"`
	IsSupportBond                   bool                         `xml:"isSupportBond"`
	IsSupport802_1x                 bool                         `xml:"isSupport802_1x"`
	IsSupportNtp                    bool                         `xml:"isSupportNtp"`
	IsSupportFtp                    bool                         `xml:"isSupportFtp"`
	IsSupportUpnp                   bool                         `xml:"isSupportUpnp"`
	IsSupportDdns                   bool                         `xml:"isSupportDdns"`
	IsSupportHttps                  bool                         `xml:"isSupportHttps"`
	IsSupport28181                  bool                         `xml:"isSupport28181"`
	IsSupportWebSocket              bool                         `xml:"isSupportWebSocket"`
	IsSupportWebSocketS             bool                         `xml:"isSupportWebSocketS"`
	IsSupportEventDataOverWebSocket bool                         `xml:"isSupportEventDataOverWebSocket"`
	IsSupportTSOverWebSocket        bool                         `xml:"isSupportTSOverWebSocket"`
	SnmpCap                         SnmpCap                      `xml:"SnmpCap"`
	IsSupportIPFilter               bool                         `xml:"isSupportIPFilter"`
	IsSupportEhome                  bool                         `xml:"isSupportEhome"`
	IsSupportWirelessDial           bool                         `xml:"isSupportWirelessDial"`
	IsSupportWifiProbe              bool                         `xml:"isSupportWifiProbe"`
	IsSupportPingDeny               bool                         `xml:"isSupportPingDeny"`
	IsSupportClusterIntercom        bool                         `xml:"isSupportClusterIntercom"`
	VerificationCodeModification    VerificationCodeModification `xml:"VerificationCodeModification"`
}

type SnmpCap struct {
	IsSupport bool `xml:"isSupport"`
}

type VerificationCodeModification struct {
	VerificationCodeType string `xml:"verificationCodeType"`
}

type SerialCap struct {
	RS485PortNums      int           `xml:"rs485PortNums"`
	SupportRS232Config bool          `xml:"supportRS232Config"`
	RS422PortNums      int           `xml:"rs422PortNums"`
	RS232PortNums      int           `xml:"rs232PortNums"`
	RS485WorkMode      RS485WorkMode `xml:"rs485WorkMode"`
}

type RS485WorkMode struct {
	Opt   string `xml:"opt,attr"`
	Value string `xml:",chardata"`
}

type ITCCap struct {
	IsSupportVehicleDetection      bool `xml:"isSupportVehicleDetection"`
	IsSupportSyncSignalOutput      bool `xml:"isSupportSyncSignalOutput"`
	IsSupportLicencePlateAuditData bool `xml:"isSupportlicencePlateAuditData"`
}

type AIDEventSupport struct {
	Opt   string `xml:"opt,attr"`
	Value string `xml:",chardata"`
}

type IsSupportVehicleIllegalType struct {
	Opt string `xml:"opt,attr"`
}

type DeviceReboot struct {
	Module Module `xml:"module"`
}

type FactoryReset struct {
	Module Module `xml:"module"`
}

type Module struct {
	Opt   string `xml:"opt,attr"`
	Value string `xml:",chardata"`
}

type OpenPlatformCap struct {
	IsSupportOpenPlatform bool `xml:"isSupportOpenPlatform"`
	MaxAPPNum             int  `xml:"maxAPPNum"`
}

type SupportQuickConfigType struct {
	Opt string `xml:"opt,attr"`
}

type VideoIntercomCap struct {
	Platform string `xml:"platform"`
}
